class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.x: C = None
        self.s: C = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: D = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.r: H = None
        self.u: E = None
        self.t: E = None
        self.s: B = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.txt = txt

d = A("d")
h = B("h")
b = C("b")
f = D("f")
e = E("e")
g = F("g")
k = G("k")
j = H("j")

d.y = g
d.q = j
d.x = b
d.s = b
d.v = e
h.r = e
b.t = g
b.y = g
b.q = f
b.v = h
f.u = j
f.t = d
f.y = d
f.v = h
e.v = h
e.r = f
g.z = h
k.v = j
k.p = j
k.r = j
k.u = e
k.t = e
k.s = h
k.y = g
j.x = e
j.y = f
assert d.y.z.r.r.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.x: C = None
        self.s: C = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: D = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.r: H = None
        self.u: E = None
        self.t: E = None
        self.s: B = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.txt = txt

d = A("d")
h = B("h")
b = C("b")
f = D("f")
e = E("e")
g = F("g")
k = G("k")
j = H("j")

d.y = g
d.q = j
d.x = b
d.s = b
d.v = e
h.r = e
b.t = g
b.y = g
b.q = f
b.v = h
f.u = j
f.t = d
f.y = d
f.v = h
e.v = h
e.r = f
g.z = h
k.v = j
k.p = j
k.r = j
k.u = e
k.t = e
k.s = h
k.y = g
j.x = e
j.y = f
assert d.y.z.r.r.y.q.txt == "j"