class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: D = None
        self.q: A = None
        self.o: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: B = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
l = B("l")
f = C("f")
i = D("i")
m = E("m")
d = F("d")
h = G("h")
g = F("g")
j = D("j")

b.u = h
l.u = m
l.t = j
l.q = b
l.o = h
l.r = f
f.s = h
f.o = l
f.p = l
f.y = d
i.v = j
i.w = j
i.u = f
m.x = d
d.y = m
d.u = m
d.v = f
h.t = b
h.w = m
h.v = m
g.y = m
g.u = m
g.v = f
j.v = i
j.w = i
j.u = f
assert i.v.u.y.v.y.v.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: D = None
        self.q: A = None
        self.o: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: B = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
l = B("l")
f = C("f")
i = D("i")
m = E("m")
d = F("d")
h = G("h")
g = F("g")
j = D("j")

b.u = h
l.u = m
l.t = j
l.q = b
l.o = h
l.r = f
f.s = h
f.o = l
f.p = l
f.y = d
i.v = j
i.w = j
i.u = f
m.x = d
d.y = m
d.u = m
d.v = f
h.t = b
h.w = m
h.v = m
g.y = m
g.u = m
g.v = f
j.v = i
j.w = i
j.u = f
assert i.v.u.y.v.y.v.p.t.txt == "j"